
package com.xcity.game.shop;

public class ShopException extends Exception {
	
	public final byte type;
	
	public static final byte TYPE_UNKNOWN = 0;
	public static final byte TYPE_ITEM_NOT_FOUND = 1; // 未找到对应商品
	public static final byte TYPE_ITEM_SOLD_OUT = 2; // 商品已售罄

	public ShopException() {
		this(TYPE_UNKNOWN);
	}
	
	public ShopException(byte type) {
		super();
		this.type = type;
	}
	
	public ShopException(String message, Throwable cause) {
		this(message, cause, TYPE_UNKNOWN);
	}

	public ShopException(String message, Throwable cause, byte type) {
		super(message, cause);
		this.type = type;
	}
	
	public ShopException(String message) {
		this(message, TYPE_UNKNOWN);
	}

	public ShopException(String message, byte type) {
		super(message);
		this.type = type;
	}
	
	public ShopException(Throwable cause) {
		this(cause, TYPE_UNKNOWN);
	}

	public ShopException(Throwable cause, byte type) {
		super(cause);
		this.type = type;
	}
	
}
